import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import store from './createStore';
import { HashRouter as Router, Route } from "react-router-dom";
import { Provider } from 'react-redux';
import 'amfe-flexible';
//dom 渲染
const renderDom = () => {
    ReactDOM.render(
        <Provider store={store}>
            <Router>
                <Route path='/' component={App} />
            </Router>
        </Provider>
        , document.getElementById('root'));
}
// const unsubscribe = store.subscribe(renderDom);
store.subscribe(renderDom);
renderDom();
registerServiceWorker();